home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / qbdoors.arc / QBPATCH.TXT < prev   
Text File  |  1987-11-23  |  9KB  |  303 lines

  1. APPENDIX S -- RBBS-PC And BASIC Compiler Patches for "Doors"
  2. ------------------------------------------------------------
  3. Both the IBM Version 2.0 BASIC compiler and Microsoft's QuickBASIC compiler
  4. offers  a lot of needed features to compiled BASIC programs.   Regrettably,
  5. they also included  a few "problems."
  6.  
  7. For  those  who use RBBS-PC to "exit" to DOS (either via a "door" or  as  a
  8. remote  SYSOP),  the code generated by the new BASIC compilers would "help"
  9. you  by dropping carrier when you chose to return to RBBS-PC from DOS or  a
  10. "door."  Help like this RBBS-PC didn't need.
  11.  
  12. Jeff  Porter was the first to document a six step "patch" to the IBM  BASIC
  13. Version  2.0  compiler  and  to BCOM10.LIB of the  QuickBASIC  Version  1.0
  14. compiler that corrects this problem within the logic of the code  generated
  15. by the QuickBASIC compiler.  Subsequently, Rod Bowman of "The PC Spectrum",
  16. (714) 945-2612,,  subsequently,  provided similar patches to the BCOM20.LIB
  17. of the QuickBASIC Version 2.0 and 2.01 compiler.
  18.  
  19.  
  20.      "RBBS-PC continues to grow and expand because hundreds
  21.       (and quite possibly thousands) of SYSOP's spend the
  22.       time and trouble not only to modify RBBS-PC to meet
  23.       their needs, but also to share these modifications
  24.       with others."   D.Thomas Mack
  25.  
  26. Please note that nowhere in the following documentation does Jeff  describe
  27. the  hours and hours it must have taken him to find the fix to the problem.
  28. Nowhere does he ask anything for himself for his efforts.   As I have  said
  29. so often "I am very proud of the company that RBBS-PC keeps."
  30.  
  31. 1.  Jeff Porter's DTR Patches for the QuickBASIC Version 1.x Compilers
  32. ----------------------------------------------------------------------
  33. As  anyone  who has tried to write any programs that use  COM1:   or  COM2:
  34. with  MicroSoft QuickBasic knows,  the DTR modem control line  is   dropped
  35. every  time a a communication file is opened or closed.   I don't know  why
  36. MicroSoft drops the DTR line all the time;  all I know  is that it can be a
  37. serious problem with programs  such  as RBBS-PC.    Therefore,   I  present
  38. the following patch to fix  the problem.
  39.  
  40. This    patch   modifies  the  serial  communication   routines   in    the
  41. BCOM10.LIB  file so that the DTR line will be not be turned off.   Here  is
  42. a  transcript  of  a  patch  session.
  43.  
  44. C>copy bcom10.lib bcom10bk.lib
  45.       1 File(s) copied
  46.  
  47. C>debug bcom10.lib
  48. -d540 L 10
  49. xxxx:0540  0B D2 75 04 B5 FF EB 34-FA 83 C2 04 32 C0 EE EB   ..u....4....2...
  50. -d830 L 10
  51. xxxx:0830  14 8B FA E8 00 00 83 C2-04 32 C0 EB 00 EE C7 47   .........2.....G
  52. -a54c
  53. xxxx:054C mov al, 1
  54. xxxx:054E
  55. -a839
  56. xxxx:0839 mov al, 1
  57. xxxx:083B
  58. -w
  59. Writing 25C00 bytes
  60. -q
  61.  
  62.  
  63. 1.   Make a backup copy of the BCOM10.LIB file, just in case.
  64.  
  65. 2.   Run debug and load BCOM10.LIB
  66.  
  67.      C>debug bcom10.lib
  68.  
  69. 3.   Display  the  following sections of data and see  that  they
  70.      match.   This is to insure that you are patching the correct
  71.      version of the library.
  72.  
  73. -d540 L 10
  74. xxxx:0540  0B D2 75 04 B5 FF EB 34-FA 83 C2 04 32 C0 EE EB   ..u....4....2...
  75. -d830 L 10
  76. xxxx:0830  14 8B FA E8 00 00 83 C2-04 32 C0 EB 00 EE C7 47   .........2.....G
  77.  
  78. 4.   If  debug shows the same information as listed  above,  then
  79.      you may continue with the patching process.   If not,  go to
  80.      the section 2 of this appendix.
  81.  
  82. 5.   Do the following:
  83.  
  84.      -a 54c
  85.      xxxx:054C mov al, 1
  86.      xxxx:054E
  87.      -a 839
  88.      xxxx:0839 mov al, 1
  89.      xxxx:083B
  90.  
  91. 6.   Now write the file back to disk and quit debug.   The  patch
  92.      is complete.
  93.  
  94.      -w
  95.      Writing         bytes
  96.      -q
  97.  
  98. 2.  Jeff Porter's DTR Patches for the IBM BASIC Version 2.0 Compiler
  99. --------------------------------------------------------------------
  100. If  you  do  not  have  MicroSoft QuickBasic or  if  you  have  a different
  101. version than I,   you can probably still  perform  this patch.    You  will
  102. have  to find the correct locations to  patch.   The  addresses  054C   and
  103. 0839 were  found  with  the  following procedure:
  104.  
  105. 1.   Search  for the byte sequence 83 C2 04 32 C0 in the  library
  106.      file.   If you are lucky,  debug will find it in exactly two
  107.      places.
  108.  
  109.      (for example:)
  110.      -s 100 fff0 83 C2 04 32 C0
  111.  
  112. 2.   Unassemble   the  addresses  you  found.    The  first   two
  113.      instructions will be
  114.  
  115.           ADD  DX, +04
  116.           XOR  AL, AL
  117.  
  118.      Within the next few instructions should be
  119.  
  120.           OUT  DX, AL
  121.  
  122. 3.   If everything has gone correctly so far, just change the
  123.  
  124.  
  125.  
  126.           XOR  AL, AL
  127.  
  128.      to a
  129.  
  130.           MOV AL, 1
  131.  
  132. 4.   Perform this change in both places where the
  133.  
  134.           XOR AL, AL
  135.  
  136.      instruction was found.
  137.  
  138.  
  139. 5.   Write the updated file.
  140.  
  141. 3.  Rod Bowman's DTR Patch for the QuickBASIC Version 2.0 Compiler
  142. ------------------------------------------------------------------
  143. Rod Bowman,  of "The 'PC' Spectrum" (tm) whose RBBS-PC data line number  is
  144. (714)  945-2612 provided the following patch for the QuickBASIC version 2.0
  145. compiler library.
  146.  
  147. This    patch   modifies  the  serial  communication   routines   in    the
  148. BCOM20.LIB  file for QuickBASIC version 2.0 so that the  DTR  line  will be
  149. not  be  turned  off when running another program with the RUN  Command  of
  150. BASIC!   Here  is  a  transcript  of  a  patch  session.
  151.  
  152. A>copy bcom20.lib bcom20bk.lib
  153.       1 File(s) copied
  154.  
  155. A>debug bcom20.lib
  156. -dD368 L 5
  157. xxxx:D368  83 C2 04 32 C0                          ..2...
  158. -aD36B
  159. xxxx:D36B mov al, 1
  160. xxxx:D36D
  161. -w
  162. Writing 2B000 bytes
  163. -q
  164.  
  165. 1.   Make a backup copy of the BCOM20.LIB file, just in case.
  166.  
  167. 2.   Run debug and load BCOM20.LIB
  168.  
  169.      A>debug bcom20.lib
  170.  
  171. 3.   Display  the  following sections of data and see  that  they
  172.      match.   This is to insure that you are patching the correct
  173.      version of the library.
  174.  
  175. -dD368 L 5
  176. xxxx:D368  83 C2 04 32 C0 EE EB                    ..2...
  177.  
  178. 4.   If  debug shows the same information as listed  above,  then
  179.      you may continue with the patching process.   If not,  go to
  180.      the section 2 of this appendix.
  181.  
  182. 5.   Do the following:
  183.  
  184.      -a D36B
  185.      xxxx:D36B mov al, 1
  186.      xxxx:D36D
  187.  
  188.  
  189. 6.   Now write the file back to disk and quit debug.   The  patch
  190.      is complete.
  191.  
  192.      -w
  193.      Writing         bytes
  194.      -q
  195.  
  196. 4.  Rod Bowman's DTR Patch for the QuickBASIC Version 2.01 Compiler
  197. -------------------------------------------------------------------
  198. Rod Bowman,  of "The 'PC' Spectrum" (tm) whose RBBS-PC data line number  is
  199. (714) 945-2612 provided the following patch for the QuickBASIC version 2.01
  200. compiler library.
  201.  
  202. This    patch   modifies  the  serial  communication   routines   in    the
  203. BCOM20.LIB  of QuickBASIC version 2.01 file so that the  DTR  line  will be
  204. not  be  turned  off when running another program with the RUN  Command  of
  205. BASIC!  Here  is  a  transcript  of  a  patch  session.
  206.  
  207. A>copy bcom20.lib bcom20bk.lib
  208.       1 File(s) copied
  209.  
  210. A>debug bcom20.lib
  211. -dD858 L 5
  212. xxxx:D858  83 C2 04 32 C0
  213. -aD85B
  214. xxxx:D85B mov al, 1
  215. xxxx:D85D
  216. -w
  217. Writing xxxxx bytes
  218. -q
  219.  
  220.  
  221. 1.   Make a backup copy of the BCOM20.LIB file, just in case.
  222.  
  223. 2.   Run debug and load BCOM20.LIB
  224.      A>debug bcom20.lib
  225. 3.   Display  the  following sections of data and see  that  they
  226.      match.   This is to insure that you are patching the correct
  227.      version of the library.
  228.  
  229. -dD858 L 5
  230. xxxx:D858  83 C2 04 32 C0
  231.  
  232. 4.   If  debug shows the same information as listed  above,  then
  233.      you may continue with the patching process.   If not,  go to
  234.      the section 2 of this appendix.
  235.  
  236. 5.   Do the following:
  237.  
  238.      -a D85B
  239.      xxxx:D85B mov al, 1
  240.      xxxx:D85D
  241.  
  242. 6.   Now write the file back to disk and quit debug.   The  patch
  243.      is complete.
  244.  
  245.      -w
  246.      Writing  xxxxx  bytes
  247.      -q
  248.  
  249.  
  250.  
  251.  
  252. 5.  DTR Patch for the QuickBASIC Version 3.0 Compiler
  253. -----------------------------------------------------
  254. This    patch   modifies  the  serial  communication   routines   in    the
  255. BCOM30.LIB  of QuickBASIC version 3.0 file so that the  DTR  line  will  be
  256. not  be  turned off when running another program with the  RUN  Command  of
  257. BASIC!  Here  is  a  transcript  of  a  patch  session.
  258.  
  259. A>copy bcom30.lib bcom30bk.lib
  260.       1 File(s) copied
  261.  
  262. A>debug bcom30.lib
  263. -dDC08 L 5
  264. xxxx:DC08  83 C2 04 32 C0
  265. -aDC0B
  266. xxxx:DC0B mov al, 1
  267. xxxx:DC0D
  268. -w
  269. Writing xxxxx bytes
  270. -q
  271.  
  272.  
  273. 1.   Make a backup copy of the BCOM30.LIB file, just in case.
  274.  
  275. 2.   Run debug and load BCOM30.LIB
  276.      A>debug bcom30.lib
  277.  
  278. 3.   Display  the  following sections of data and see  that  they
  279.      match.   This is to insure that you are patching the correct
  280.      version of the library.
  281.  
  282. -dDC08 L 5
  283. xxxx:DC08  83 C2 04 32 C0
  284.  
  285. 4.   If  debug shows the same information as listed  above,  then
  286.      you may continue with the patching process.   If not,  go to
  287.      the section 2 of this appendix.
  288.  
  289. 5.   Do the following:
  290.  
  291.      -a DC0B
  292.      xxxx:DC0B mov al, 1
  293.      xxxx:DC0D
  294.  
  295. 6.   Now write the file back to disk and quit debug.   The  patch
  296.      is complete.
  297.  
  298.      -w
  299.      Writing  xxxxx  bytes
  300.      -q
  301.  
  302.  
  303.